package uutalk.netcloud.talk.model.bean;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * Created by Administrator on 2017/3/30.
 */

public class MqttBussinessBean {

    public String from_type;
    public String from_id;
    public String to_type;
    public String to_id;
    public String cmd;

    @JSONField(serialize = false)
    public String error_msg;
    @JSONField(serialize = false)
    public String error_no;

    public String getCmd() {
        return cmd;
    }

    public void setCmd(String cmd) {
        this.cmd = cmd;
    }

    public String getFrom_type() {
        return from_type;
    }

    public void setFrom_type(String from_type) {
        this.from_type = from_type;
    }

    public String getFrom_id() {
        return from_id;
    }

    public void setFrom_id(String from_id) {
        this.from_id = from_id;
    }

    public String getTo_type() {
        return to_type;
    }

    public void setTo_type(String to_type) {
        this.to_type = to_type;
    }

    public String getTo_id() {
        return to_id;
    }

    public void setTo_id(String to_id) {
        this.to_id = to_id;
    }

    public String getError_msg() {
        return error_msg;
    }

    public void setError_msg(String error_msg) {
        this.error_msg = error_msg;
    }

    public String getError_no() {
        return error_no;
    }

    public void setError_no(String error_no) {
        this.error_no = error_no;
    }

    @JSONField(serialize = false,deserialize = false)
    public boolean isOk(){
        if("0".equals(error_no)||error_no==null){
            return true;
        }
        return false;
    }
}
